﻿using System;
using System.Configuration;
using System.Xml.Serialization;
using System.Xml;

namespace QzEbook.ReWrite
{
    public class RewriterConfigSerializerSectionHandler:IConfigurationSectionHandler
    {
        public RewriterConfigSerializerSectionHandler()
        {
        }

        #region IConfigurationSectionHandler 成员

        public object Create(object parent, object configContext, System.Xml.XmlNode section)
        {
            XmlSerializer ser = new XmlSerializer(typeof(RewriterConfig));
            return ser.Deserialize(new XmlNodeReader(section));
        }

        #endregion
    }
}